Previous Book Contents Book Index Next

Inside Macintosh: Programming With the Text Encoding Conversion Manager /
Chapter 4 - Unicode Converter Reference / Unicode Converter Structures and Other Types
/


UnicodeToTextFallbackProcPtr

In converting a text string, when the Unicode Converter encounters a source text element for which there is no destination encoding equivalent, it may use loose mappings and fallback characters to perform the conversion.

A fallback handler is a function that the Unicode Converter uses to perform fallback mapping. To assign your fallback handler to a Unicode converter object, you use the function SetFallbackUnicodeToText (page 172) or SetFallbackUnicodeToTextRun (page 175). Your own fallback handler must adhere to the following prototype function defined by the Unicode Converter:

typedef pascal OSStatus (*UnicodeToTextFallbackProcPtr)(
                     UniChar     *iSrcUniStr,
                     ByteCount   iSrcUniStrLen,
                     ByteCount   *oSrcConvLen,
                     TextPtr     oDestStr,
                     ByteCount   iDestStrLen,
                     ByteCount   *oDestConvLen,
                     LogicalAddressiInfoPtr,
                     ConstUnicodeMappingPtr iUnicodeMappingPtr);
For information about creating a fallback handler function, see the description of the function MyUnicodeToTextFallbackProc (page 177).


Previous Book Contents Book Index Next

© Apple Computer, Inc.
13 NOV 1997